<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script type="text/javascript">
			function gh(){
				var a=document.getElementById("a");
				var b=a.value;
				if(window.isNaN(b)){
					alert("不是一个数字");
				}else{
					alert("这是"+a.value);
				}
			}
		</script>
	</head>
	<body>
		<input id="a" value="" />
		<button onclick="gh()">按钮</button>
	</body>
</html>
